package com.tianji.learning.controller;


import com.tianji.common.domain.query.PageQuery;
import com.tianji.learning.domain.vo.LearningLessonVO;
import com.tianji.learning.service.ILearningLessonService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.List;

/**
 * <p>
 * 学生课程表 前端控制器
 * </p>
 *
 * @author dmx
 * @since 2024-12-07
 */
@RestController
@RequestMapping("/lessons")
@RequiredArgsConstructor
public class LearningLessonController {

    private final ILearningLessonService learningLessonService;

    /**
     * 分页查询我的课程
     * @param pageQuery
     * @return
     */
    @GetMapping("/page")
    public List<LearningLessonVO> pageQuery(PageQuery pageQuery){
        //调用server层
        return learningLessonService.pageQuery(pageQuery);
    }
}
